{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 资产管理
    <span class="c-gray en">&gt;</span> 合约收益
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="/money/recordContract" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form  method="get" action="">
        <div class="text-c">
            日期范围：
            <input type="text" onfocus="WdatePicker()" value="{:input('get.start')}" name="start" id="datemin" class="input-text Wdate" style="width:120px;" autocomplete="off">
            -
            <input type="text" onfocus="WdatePicker()" value="{:input('get.end')}" name="end" id="datemax" class="input-text Wdate" style="width:120px;" autocomplete="off">
            <input type="text" class="input-text" style="width:250px" placeholder="UID/账号" value="{:input('word')}" name="word">
            <input type="text" class="input-text" style="width:250px" placeholder="订单号" value="{:input('sn')}" name="sn">
            <span class="select-box" style="width: 100px;">
                <select name="gid" class="select">
                    <option value="0">全部商品</option>
                    {foreach $goods as $v}
                        {if isset($_GET['gid']) && $v.id ==  $_GET['gid']}
                        <option value="{$v.id}" selected>{$v.name}</option>
                        {else/}
                        <option value="{$v.id}">{$v.name}</option>
                        {/if}
                    {/foreach}

                </select>
            </span>
<!--            <span class="select-box" style="width: 100px;">-->
<!--                <select name="type" class="select">-->
<!--                    <option value="0">全部类型</option>-->
<!--                    <option value="1" {if isset($_GET['type']) && $_GET['type'] == 1}selected{/if}>奖金</option>-->
<!--                    <option value="2" {if isset($_GET['type']) && $_GET['type'] == 2}selected{/if}>兑换券</option>-->
<!--                    <option value="3" {if isset($_GET['type']) && $_GET['type'] == 3}selected{/if}>合约收益</option>-->
<!--                    <option value="4" {if isset($_GET['type']) && $_GET['type'] == 4}selected{/if}>MT</option>-->
<!--                </select>-->
<!--            </span>-->
            <button type="submit" class="btn btn-success">搜索</button>
        </div>
    </form>

    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">
        </span>
        <span class="r">共有数据：<strong>{$list->total()}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-hover table-bg">
        <thead>
        <tr>
            <th scope="col" colspan="9">合约收益发放记录</th>
        </tr>
        <tr class="text-c">
            <th width="30">出售id</th>
            <th width="80">出售sn</th>
            <th width="50">商品名</th>
            <th width="100">商品信息</th>
            <th width="100">发放收益</th>
            <th width="50">用户</th>
            <th width="50">奖金发放</th>
            <th width="100">时间</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $v}
        <tr class="text-c">
            <td>{$v.sell_id}</td>
            <td>{$v.sell_sn}</td>
            <td>{$v.gid}-{$v.gname}</td>
            <td>{$v.gmark}天数{$v.days}</td>
            <td>MT{$v.mt}-合约收益{$v.profit}</td>
            <td>{$v.uid}-{$v.username}</td>
            <td>{switch name="$v.flag"}
                {case value="1"}奖金发放时间：{$v.bouns_time}{/case}
                {default /}奖金未发放
                {/switch}</td>
            <td>{$v.time}</td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="page">
        {$list->render()|raw}
    </div>
</div>

{include file="public/footer" /}